Skip to content

fix(tools): retain source commit when Git status fails - #5713

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
Ondra97:codex/fix-audit-partial-source-stamp
Oct 15, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
Ondra97:codex/fix-audit-partial-source-stamp

Conversation

@Ondra97

@Ondra97 Ondra97 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What

An audit JSON loses a valid source_commit when git rev-parse HEAD succeeds but git status --porcelain fails, for example because a submodule's Git directory is unreadable or missing. This occurred in a local title audit: the source revision was readable, but status failed on LibAtrac9 and the report set both provenance fields to null.

Keep the successfully read revision and set only source_dirty to null when status is unavailable. A failed revision query still leaves both fields null. Import classification and exit status are unchanged.

Tested

Windows x64, Python 3.14 and Git; current main b27d18c3e, head fd3c67960.

Current-head CI for fd3c67960 passed conventions and eligibility, plus all three relinker builds and complete test suites (Build):

  • relinker (macos-latest, clang++): 149 CTest tests, zero failures; import_audit passed.
  • relinker (windows-latest, g++): 153 CTest tests, zero failures; import_audit passed.
  • relinker (ubuntu-latest, g++): 158 CTest tests, zero failures; import_audit passed.

Full runtime-library jobs were skipped by the repository's PR workflow.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
#6171 tools/import_audit.py
tools/tests/test_import_audit.py

@adriadam10 adriadam10 self-assigned this Oct 15, 2026
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked git_stamp (rev-parse and status now fail independently; a failed rev-parse still gives (None, None)) and source_dirty is only dumped to the JSON. Both new tests fail against main's import_audit.py (source_commit is None) and pass with the change; relinker CI green on all three hosts. Merging.

@adriadam10
adriadam10 merged commit d106eef into boykopovar:main Oct 15, 2026
12 checks passed
@Ondra97
Ondra97 deleted the codex/fix-audit-partial-source-stamp branch October 17, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants